﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace pardusshipcalc
{
    class Rank
    {
        public string rank
        {
            get;
            set;
        }

        public string ParseRankIDToString(int RankRequirements)
        {
        //    string rank = "";

            switch (RankRequirements)
            {
                // Federation
                case 11:
                    rank = "Recruit";
                    return rank;

                case 12:
                    rank = "Private";
                    return rank;

                case 13:
                    rank = "Corporal";
                    return rank;

                case 14:
                    rank = "Sergeant";
                    return rank;

                case 15:
                    rank = "Sgt-Major";
                    return rank;

                case 16:
                    rank = "Major";
                    return rank;

                case 17:
                    rank = "Colonel";
                    return rank;

                case 18:
                    rank = "Lieutenant";
                    return rank;

                case 19:
                    rank = "Lt. Commander";
                    return rank;

                case 110:
                    rank = "Captain";
                    return rank;

                case 111:
                    rank = "Commodore";
                    return rank;

                case 112:
                    rank = "Rear Admiral";
                    return rank;

                case 113:
                    rank = "Admiral";
                    return rank;

                case 114:
                    rank = "Fleet Admiral";
                    return rank;

                //Empire
                case 21:
                    rank = "Outsider";
                    return rank;

                case 22:
                    rank = "Serf";
                    return rank;

                case 23:
                    rank = "Master/Mistress";
                    return rank;

                case 24:
                    rank = "Sir/Dame";
                    return rank;

                case 25:
                    rank = "Squire";
                    return rank;

                case 26:
                    rank = "Lord/Lady";
                    return rank;

                case 27:
                    rank = "Baron/Baroness";
                    return rank;

                case 28:
                    rank = "Viscount/Viscountess";
                    return rank;

                case 29:
                    rank = "Count/Countess";
                    return rank;

                case 210:
                    rank = "Earl/Marchesa";
                    return rank;

                case 211:
                    rank = "Marquis/Marchioness";
                    return rank;

                case 212:
                    rank = "Duke/Duchess";
                    return rank;

                case 213:
                    rank = "Prince/Princess";
                    return rank;

                case 214:
                    rank = "King/Queen";
                    return rank;

                // Union
                case 31:
                    rank = "Flunkey";
                    return rank;

                case 32:
                    rank = "Minion";
                    return rank;

                case 33:
                    rank = "Acolyte";
                    return rank;

                case 34:
                    rank = "Bookie";
                    return rank;

                case 35:
                    rank = "Collector";
                    return rank;

                case 36:
                    rank = "Accountant";
                    return rank;

                case 37:
                    rank = "Cleaner";
                    return rank;

                case 38:
                    rank = "Made Man/Made Woman";
                    return rank;

                case 39:
                    rank = "Chief";
                    return rank;

                case 310:
                    rank = "Kingpin";
                    return rank;

                case 311:
                    rank = "Nephew/Niece";
                    return rank;

                case 312:
                    rank = "Son/Daughter";
                    return rank;

                case 313:
                    rank = "Godfather/Godmother";
                    return rank;

                case 314:
                    rank = "Mogul";
                    return rank;

                // TSS Competency
                case 41:
                    rank = "TSS Competency 1";
                    return rank;

                case 42:
                    rank = "TSS Competency 2";
                    return rank;

                case 43:
                    rank = "TSS Competency 3";
                    return rank;

                case 44:
                    rank = "TSS Competency 4";
                    return rank;

                case 45:
                    rank = "TSS Competency 5";
                    return rank;

                case 46:
                    rank = "TSS Competency 6";
                    return rank;

                case 47:
                    rank = "TSS Competency 7";
                    return rank;

                case 48:
                    rank = "TSS Competency 8";
                    return rank;

                case 49:
                    rank = "TSS Competency 9";
                    return rank;

                case 410:
                    rank = "TSS Competency 10";
                    return rank;

                case 411:
                    rank = "TSS Competency 11";
                    return rank;

                case 412:
                    rank = "TSS Competency 12";
                    return rank;

                case 413:
                    rank = "TSS Competency 13";
                    return rank;

                // EPS Competency
                case 51:
                    rank = "EPS Competency 1";
                    return rank;

                case 52:
                    rank = "EPS Competency 2";
                    return rank;

                case 53:
                    rank = "EPS Competency 3";
                    return rank;

                case 54:
                    rank = "EPS Competency 4";
                    return rank;

                case 55:
                    rank = "EPS Competency 5";
                    return rank;

                case 56:
                    rank = "EPS Competency 6";
                    return rank;

                case 57:
                    rank = "EPS Competency 7";
                    return rank;

                case 58:
                    rank = "EPS Competency 8";
                    return rank;

                case 59:
                    rank = "EPS Competency 9";
                    return rank;

                case 510:
                    rank = "EPS Competency 10";
                    return rank;

                case 511:
                    rank = "EPS Competency 11";
                    return rank;

                case 512:
                    rank = "EPS Competency 12";
                    return rank;

                case 513:
                    rank = "EPS Competency 13";
                    return rank;

            }
            return "Invalid Rank";
        }

        /// <summary>
        /// TODO only supports imperials, lazy!
        /// </summary>
        /// <param name="rPath"></param>
        /// <returns></returns>
        public string parseRankPathToString(string rPath)
        {
            string retVal ="";
            
            switch (rPath)
            {
                case "emprank1.png":
                    retVal = "Outsider";
                    break;

                case "emprank2.png":
                    retVal = "Serf";
                    break;

                case "emprank3.png":
                    retVal = "Master/Mistress";
                    break;

                case "emprank4.png":
                    retVal = "Sir/Dame";
                    break;

                case "emprank5.png":
                    retVal = "Squire";
                    break;

                case "emprank6.png":
                    retVal = "Lord/Lady";
                    break;

                case "emprank7.png":
                    retVal = "Baron/Baroness";
                    break;

                case "emprank8.png":
                    retVal = "Viscount/Viscountess";
                    break;

                case "emprank9.png":
                    retVal = "Count/Countess";
                    break;

                case "emprank10.png":
                    retVal = "Earl/Marchessa";
                    break;

                case "emprank11.png":
                    retVal = "Marquis/Marchioness";
                    break;

                case "emprank12.png":
                    retVal = "Duke/Duchess";
                    break;

                case "emprank13.png":
                    retVal = "Prince/Princess";
                    break;

                case "emprank14.png":
                    retVal = "King/Queen";
                    break;


                default: retVal = ""; break;
            }
            return retVal;
            }
    }
}
